package GUI;

import java.awt.event.ActionListener;

import java.awt.Color;
import javax.swing.JButton;


/**
 * The Class MarketingEmployeeGUI.
 * Boundary for marketing employee activities.
 */
public class MarketingEmployeeGUI extends AbstractPanelGUI {
	
	/** The button insert product details. */
	private JButton btnInsertProductDetails;
	
	/** The button define marketing patterns. */
	private JButton btnDefineMarketingPatterns;
	
	/** The button compute ranks. */
	private JButton btnComputeRanks;
	
	/** The button back. */
	private JButton btnBack;
	
	/** The button send permission request. */
	private JButton btnSendPermissionRequest;

	/**
	 * Create the panel.
	 */
	public MarketingEmployeeGUI() {
		setBackground(Color.ORANGE);
		initialize();
	}

	/**
	 * initializes different properties of the panel and components.
	 */
	public void initialize() {
		setSize(500, 400);
		setLayout(null);
		
		btnInsertProductDetails = new JButton("Insert Product Details");
		btnInsertProductDetails.setBounds(136, 144, 244, 50);
		add(btnInsertProductDetails);
		
		btnDefineMarketingPatterns = new JButton("Create Marketing Patterns");
		btnDefineMarketingPatterns.setBounds(136, 205, 244, 50);
		add(btnDefineMarketingPatterns);
		
		btnComputeRanks = new JButton("Compute Ranks");
		btnComputeRanks.setBounds(136, 266, 244, 50);
		add(btnComputeRanks);
		
		btnBack = new JButton("Back");
		btnBack.setBounds(10, 345, 89, 23);
		add(btnBack);
		
		btnSendPermissionRequest = new JButton("Send permission request");
		btnSendPermissionRequest.setBounds(136, 83, 244, 50);
		add(btnSendPermissionRequest);
	}
	
	
	
	/**
	 * Adds action listener to the insert product details button.
	 *
	 * @param listener the listener
	 */
	public void addSendPermissionRequestActionListener(ActionListener listener)
	{
		btnSendPermissionRequest.addActionListener(listener);
	}
	
	/**
	 * Adds action listener to the insert product details button.
	 *
	 * @param listener the listener
	 */
	public void addInsertProductDetailsActionListener(ActionListener listener)
	{
		btnInsertProductDetails.addActionListener(listener);
	}
	
	/**
	 * Adds action listener to the define marketing patterns button.
	 *
	 * @param listener the listener
	 */
	public void addDefineMarketingPatternsActionListener(ActionListener listener)
	{
		btnDefineMarketingPatterns.addActionListener(listener);
	}
	
	/**
	 * Adds action listener to the compute ranks button.
	 *
	 * @param listener the listener
	 */
	public void addComputeRanksActionListener(ActionListener listener)
	{
		btnComputeRanks.addActionListener(listener);
	}
	
	/**
	 * Adds action listener to the back button.
	 *
	 * @param listener the listener
	 */
	public void addBackActionListener(ActionListener listener)
	{
		btnBack.addActionListener(listener);
	}

	/**
	 * Gets the button back.
	 *
	 * @return the button back
	 */
	public JButton getBtnBack() {
		return btnBack;
	}

	/**
	 * Sets the button back.
	 *
	 * @param btnBack the new button back
	 */
	public void setBtnBack(JButton btnBack) {
		this.btnBack = btnBack;
	}
	
}
